import { defineStore } from 'pinia'
import type { Parameter } from '@/types/ParameterType'

interface State {
  parameter: Parameter
}

export const useParameterstore = defineStore('parameter', {
  state: (): State => {
    return {
      parameter: {
        id: 0,
        name: '',
        emps: [],
        humanList: [],
        equipmentList: [],
        sample: {
          informationFile: '',
          photo: '',
          followStandard: true
        },
        sop: {
          file: '',
          followStandard: true
        },
        facilityList: [],
        compareValidList: [],
        simulation: {
          report: '',
          origin: '',
          followStandard: true
        },
        status: 'Uncompleted',
        labAdmin: {
          username: '',
          type: ''
        }
      }
    }
  },
  persist: true
})
